package com.uzai.common.enums;

/**
 * 社群黑名单类型
 * @Auther: xiaoyuexl
 * @Date: 2021/8/13 11:22
 * @Description:
 */
public enum WxqBlacklistTypeEnum {
    COMMON(0,"打广告"),
    BRUSH(1,"刷屏"),
    SHOP(2,"敏感词"),
    EXTORT(3,"其他");

    private Integer value;
    private String desc;

    WxqBlacklistTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static WxqBlacklistTypeEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (WxqBlacklistTypeEnum type: WxqBlacklistTypeEnum.values()) {
            if (type.getValue().intValue() == id) {
                return type;
            }
        }
        return null;
    }
}
